package eclipse.client;

import java.awt.*;
import java.util.List;

import javax.media.opengl.jgloo.jglfx.JGLParticleEngine;

import com.sun.opengl.util.texture.*;
import eclipse.*;
import eclipse.client.forms.*;
import eclipse.client.threadpool.*;
import eclipse.lib.player.*;
import eclipse.lib.StandardForm;
import eclipse.lib.sockets.*;
import eclipse.lib.graphics.*;
import eclipse.lib.sound.*;
/** Eclipse's Object dump. Anything that the Client uses is stored here. */
/*
 * Copyright (c) 2009, TOD Productions All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 *	- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 *	- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 *	-Neither the name of the organization nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
 */
public final class Database 
{
	/** Represents the expected lag specified */
	public static LATENCY			lag;
	/** Represents the player's ID */
	public static int				myID = 0x00;
	/** Represents all of the Players */
	public static Player[]			player;
	/** Represents the surface where OpenGL draws to. */
	public static Container			drawSurface;	
	/** Represents the interface which connects OpenGL to the Client */
	public static GLInterface		glInterface;
	/** Represents the Thread Pool object */
	public static ThreadCache		threadCache;
	/** Represents the Object for the Logo */
	public static int ID_LOGO;
	/** Represents the Object for the Menu */
	public static int ID_MENU;	
	/** true = Running as Applet
	 * false = Running as Application
	 */
	public static boolean			APPLET = false;
	/** Represents the current displayed Menu */
	public static int 				MENUSTATE = Constants.MENUSTATE_SPLASHSCREEN;
	/** Represents the collection of Server Ports */
	public static List	<Object>	SERVERPORT;
	/** Represents the collection of Server IPs */
	public static List	<String>	SERVERIP;
	/** Represents the collection of Server Names */
	public static List	<String>	SERVERNAME;
	/** The number of possible servers */
	public static int 				MAXSERVERS;
	/** Represents the Socket Object */
	public static ClientSocket 		Socket;
	/** Represents the Audio Playback Device */
	public static AudioDevice		audioChannel;
	/** Represents the Player's login username */
	public static String			USERNAME = "";
	/** Represents the Player's login password */
	public static String			PASSWORD = "";	
	/** Represents the path for the Main Menu image */
	public static String 			IMGMAINMENU;
	/** Represents the path for the Login Menu image */
	public static String			IMGLOGIN;
	/** Represents the path for the Character Select Menu image */
	public static String			IMGNEWCHARACTER;
	/** Represents teh path for the New Account Menu image */
	public static String			IMGNEWACCOUNT;
	/** Represents the path for the "Mirage" Menu image */
	public static String			IMGMIRAGEMENU;
	/** Represents the title for the news. */
	public static String			NEWSTITLE = "";
	/** Represents the body for the news. */
	public static String			NEWSBODY = "";
	/** Represents teh name of the Game */
	public static String			GAME_NAME = "Eclipse";
	/** Represents the path for the tiles */
	public static String			TILEDATABASE;
	/** Represents the path for the sprites */
	public static String			SPRITEDATABASE;
	/** Represents the maximum number of Sprite Sheets */	
	public static int				MAX_SPRITESETS;
	/** Represents the maximum number of Players */
	public static int 				MAX_PLAYERS;
	/** Represents the maximum number of Items */
	public static int 				MAX_ITEMS;
	/** Represents the maximum number of NPCs */
	public static int				MAX_NPCS;
	/** Represents the maximum number of Shops */
	public static int				MAX_SHOPS;
	/** Represents the maximum number of Spells */
	public static int				MAX_SPELLS;
	/** Represents the maximum number of Maps */
	public static int				MAX_MAPS;
	/** Represents the maximum number of Map Items */
	public static int 				MAX_MAP_ITEMS;
	/** Represents the maximum number of Emoticons */	
	public static int				MAX_EMOTICONS;
	/** Represents the maximum number of Elements */
	public static int				MAX_ELEMENTS;
	/** Represents teh maximun number of Classes */
	public static int				MAX_CLASSES;
	/** 
	 * 1 = Paperdoll is on
	 * 0 = Paperdoll is off (any number <> 1)
	 */
	public static int				PAPERDOLL;
	/** Represents the maximum number of scripted spells */
	public static int				MAX_SCRIPTSPELLS;
	/** Represents the level restriction */
	public static int				LEVEL;
	/** Represents the maximum number in a party */
	public static int				MAX_PARTY_MEMBERS;
	/** Represents the maximum number of Tile Sets */
	public static int				MAX_TILESETS;
	public static int 				ID_LAYER[]; 
	/** Represents the Object for the SkyBox */
	public static int				ID_SKYBOX;
	/** X-Position of the camera */
	public static float 			CameraX = 0f;
	/** Y-Position of the camera */
	public static float 			CameraY = 0f;
	/** Y-Rotation of the camera */
	public static float				CameraROTY = 0f;
	/** Represents the names for the stats */
	public static String			STAT1, STAT2, STAT3, STAT4;
	/** Represents whether all the data was received */
	public static boolean			AllDataReceived = false;
	/** Represents the texture for nothing */
	public static Texture			tBLANK;
	/** Represents teh texture for the fog */
	public static Texture			tFOG;
	/** Represents the texture for the Logo */
	public static Texture 			tLogo;
	/** Represents the texture for the Tile Sheets */
	public static Texture 			tTileSheet[];
	/** Represents the texture for the Sprite Sheets */
	public static Texture			tSpriteSheet[];	
	/** Represents the texture for the SkyBox */
	public static Texture			tSkyBox;
	/** Represents the texture for text */
	public static Texture			tFont;
	/** Represents the texture for flashlights/lanterns */
	public static Texture			tFlashlight;
	/** Represents the texture for spotlights */
	public static Texture			tSpotLight;
	
	/** Exit button's x-y coordinates */
	public static int MAINMENUEXITX, 		MAINMENUEXITY;		//button coordinates
	/** Exit button's width/height */
	public static int MAINMENUEXITW, 		MAINMENUEXITH;		//button coordinates
	/** Login button's x-y coordinates */
	public static int MAINMENULOGINX, 		MAINMENULOGINY;
	/** Login button's width/height */
	public static int MAINMENULOGINW, 		MAINMENULOGINH;
	/** New Account button's x-y coordinates */
	public static int MAINMENUNEWACCOUNTX,	MAINMENUNEWACCOUNTY;
	/** New Account button's width/height */
	public static int MAINMENUNEWACCOUNTH,	MAINMENUNEWACCOUNTW;
	
	/** Login exit button's x-y coordinates */
	public static int LOGINEXITX,			LOGINEXITY;	//Button coordinates
	/** Login exit button's width/height */
	public static int LOGINEXITW,			LOGINEXITH; //button coordinates
	/** Login login button's x-y coordinates */
	public static int LOGINLOGINX,			LOGINLOGINY;//Button coordinates
	/** Login login width/height */
	public static int LOGINLOGINW,			LOGINLOGINH;//Button coordinates	
		
	/** New Account's exit button's x-y coordinates */
	public static int NEWACCOUNTEXITX,		NEWACCOUNTEXITY;
	/** New Account's exit button's width/height */
	public static int NEWACCOUNTEXITW,		NEWACCOUNTEXITH;
	/** New Account's config button's x-y coordinates */
	public static int NEWACCOUNTCONFX,		NEWACCOUNTCONFY;
	/** New Account's config button's width/height */
	public static int NEWACCOUNTCONFW,		NEWACCOUNTCONFH;	
			
	/** FPS count, used for determining the value of fps */
	public static int 		fpsCount		= 0;
	/** true will change set-up to allow 3D */
	public static boolean 	RENDER_AS_3D	= false;
	/** true will build mipmaps and allow better shading */
	public static boolean 	HIGH_RES		= true;
	/** FPS of the engine */
	public static int 		FPS				= 30;	
		
	/** Login window */
	public static Login 					Login;
	/** Main Menu window, this is where any other window starts */
	public static MainMenu 					MainMenu;
	/** Eclipse window, all OpenGL code draws to this */
	public static StandardForm 				Eclipse;
	/** New Account window, for creating a new account */
	public static NewAccount				NewAccount;
	/** New Character window, for creating a new character for an account */
	public static NewCharacter				NewCharacter;
	
	/** Particle engine object, only support 1000 particles */	
	public static JGLParticleEngine			particleEngine = new JGLParticleEngine(1000);
	
	/** Represents anything that moves within the Splash Screen */
	public static float logoSpin = 0f;
}
